package com.shoulder.core.utils;

import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;

import java.util.List;

public class FreeUtils {
    public static List<String> ENDPOINTS = Lists.newArrayList(
            "/doc/**", "/error", "/static/doc/**"
    );

    public static String[] build(String... urls) {

        if (urls != null && urls.length > 0) {
            ENDPOINTS.addAll(Lists.newArrayList(urls));
            return Iterables.toArray(ENDPOINTS, String.class);
        }

        return Iterables.toArray(ENDPOINTS, String.class);
    }
}